package design_pattern;
//抽象工厂
public interface AbsFactory {
    Phone createPhone(String param);
    Mask createMask(String param);
}
class SuperFactory implements AbsFactory{

    @Override
    public Phone createPhone(String param) {
        return new iPhone();
    }

    @Override
    public Mask createMask(String param) {
        return new N95();
    }
}

//产品大类 手机
interface Phone{

}
class iPhone implements Phone{}

//产品大类 口罩
interface Mask{}

class N95 implements Mask{}